<%= render partial: "highlight",
   locals: {highlight: "ex5", name:"Ex5: 如何改变类属性"} %>

   <style>
     .error {
       color: red;
     }
     .success {
       color: green;
     }
   </style>

   <p>
     <a id="my-add-class-click">Add Class</a>

     <a id="my-remove-class-click">Remove Class</a>
   </p>

   <div id="foo">
     <h1>bar</h1>
   </div>

   <script>
     $("#my-add-class-click").click(function(){
       $("#foo").addClass('success');
     });
     $("#my-remove-class-click").click(function(){
       $("#foo").removeClass('success');
     });
   </script>
